package com.ycg.biquge.pojo.vo;

import com.ycg.biquge.pojo.Novel;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author YCG
 * @date 2024-05-11 19:36
 * @description 搜索结果
 */
@Data
@NoArgsConstructor
public class SearchInfo implements Serializable {

    private Integer id;
    private String name;
    private String author;
    private String picture;
    private String simple;

    public SearchInfo(Novel novel) {
        this.id = novel.getId();
        this.name = novel.getName();
        this.author = novel.getAuthor();
        this.picture = novel.getPicture();
        this.simple = novel.getSimple();
    }

}
